Skip to main content

VIM essentials

· One min read
Marcel Scherzer
Enthusiast

This post is a compact cheat‑sheet for the Vim motions and operators I lean on most when editing code.

Vim Essentials =+-

In my opinion, the best way to fast-tracking your VIM skill set is to understand some principle concepts.

In most cases, commands can be strung together as follows:

1 - The action to perform - (operator) command. 2 - The number of "objects" against which the action is to be applied 3 - Which "text object motion"

Essential motions:

KeyMotion
tJust before character
wforward beginning of word
bbackward beginngin of word
eforward end of word
[[next section
(sentence
{paragraph
$end of line
0beginning of line
^non empty space on line
wforward N words at a time
eforward to the end of the word
bbackwards

Essentials commands

KeyCommand
cchange inside: ", ', {, ( [, t
ddelete
yyank
ppaste after / P paste before
o
g~swap case
gulower case
gUupper case
.repeat command